// 2.引入mysql模块
let mysql = require("mysql");
// 3.连接数据库
function getConnection(){
    let connection = mysql.createConnection({
        host: 'localhost',
        user: 'root',
        password: 'root',
        database: 'studentdb',
        port: 3306
    });
    return connection

}
module.exports=getConnection;
